{% extends 'base.html' %}

{% load util %}

{% block title %}Display for {{user.username}}{% endblock %}

{% block content %}

<h2>Welcome, {{user.username}}</h2>

<p>This page shows you all events you can register for, have registered for, and have gone to in the past.   
From here you can register by clicking on the event you wish, or update your registration by clicking on the appropriate re-register link.
{% if open_events %}
<h2 align="center">Open Events</h2>
<p>
Click on any event to register.
<p>
<ul>
    {% for evt in open_events %}
    <p>	
 <li>  <a href="../../{{group_or_individual}}/{{evt.event}}"> 	{{evt.longname}}, {{evt.date|date:"l, F d"}} </a>
    
 </ul>
    {% endfor %}

<hr>

{% endif %}

{% if reg_list_cur %}
	<h2 align="center">Current Registrations</h2>
    <ul>
    {% for reg in reg_list_cur %}
        
        <li><h3>{{reg.eventrec.longname}}, {{reg.eventrec.date|date:"l, F d, Y"}}</h3>
        {% if reg.cancelled %}<b>NOT</b> {% endif %} Registered as {{ reg.nickname }} ({{reg.psdid}}), 
         {{reg.geekCode}}  
        <p align="right">&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp;
        Not right? 
        {% if reg.is_group %}
          <a href="{% url psd.register.views.sign_up_group event_name=reg.event %}">Re-register</a>
		{%else%}
		 <a href="{% url psd.register.views.sign_up_indiv event_name=reg.event %}">Re-register</a>
		{%endif%} 
        
<h3>Event Details</h3>
<ul>
{{reg.eventrec.date|date:"l, F d, Y"}} from {{reg.eventrec.starttime|time:"f"}}-{{reg.eventrec.stoptime|time:"fa"}}
<br>at the <a href="{{reg.eventrec.locationURL}}">{{reg.eventrec.location}}</a>
<br>{{reg.eventrec.address}} {{reg.eventrec.accessdetails}}
<p>Check-in starts at {{ reg.eventrec.starttime|time:"fa" }}
 You <em>must</em> be there by {{ reg.eventrec.deadlinetime|time:"fa" }}</p>
</ul>
  

<h3>Payment Status</h3>
<ul>
{% if reg.paid %} You have paid.
<p>
If this is in error, please contact us.
{% else %}

{% if reg.pending %}
<p>
 You have not yet paid, but you have made arrangements to pay.
 {% else %}
<p>
<b>We have not yet recorded any payment or arrangement for you to pay.</b>
<p>  Please note that it takes us awhile to mark down special payment arrangements since this information is not automatically loaded into the database.   However, if it has been longer than a week since you paid or made arrangements to pay, but there is no note of that above, then please email us.
{% endif %}  

<p>  If you feel you have paid in full and we do not have that noted above, then please email us.


{% endif %}


{% if reg.cancelled %}
<h3 align="center">Please note that we think you have told us that you are <b>cancelling</b> your registration.</h3>
{% endif %}

</ul>

{% if reg.stationary %}
<h3>Mobility Note</h3>
<ul>
<p>We have a note that you would prefer to move from seat to seat as little as possible due to some mobility constraints.  
</ul>
{% endif %}

{% if reg.hasNotes %}
<h3>Misc. Notes</h3>
<ul>
<p>{{ reg.notes|safe }}</p>
{% endif %}


<h3 align="center">If there is an error, contact us!  Click <a href="mailto:info@polyspeeddating.com">here</a> to email.</h3>
         
        
        
        </p><p>&nbsp</p></li>
        
    {% endfor %}
    </ul>
{% endif %}

<hr>

<h2 align="center">Past Registrations</h2>

{% if reg_list_past %}
    <ul>
    {% for reg in reg_list_past %}
        
        <li><b>{{reg.eventrec.longname}}, {{reg.eventrec.date|date:"l, F d, Y"}}</b><br>
      
              </p><p>&nbsp</p></li>
        
    {% endfor %}
    </ul>
{% else %}
    <p>No past registrations.</p>
{% endif %}


{% endblock %}
